programming4us
           
 
 
Windows

SOA with .NET and Windows Azure : Service Hosting with WCF (part 1)

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
12/15/2010 11:27:38 AM
WCF service is independent of the hosting environment, allowing the most appropriate hosting model to be selected without the need to change anything in the service.

There are several options when it comes to hosting WCF services:

  • Internet Information Services (IIS)

  • Windows Activation Service (WAS) installed with IIS 7.0

  • any managed application process, including console, Windows Forms, Windows Presentation Foundation (WPF)

  • any managed Windows service applications

The ServiceHost class can be used to host a WCF service when IIS or WAS is not used. The ServiceHost instance must be initialized with the base address and one or more endpoints that include binding and contract parameters, as shown in the following example:

Example 1.
ServiceHost host =
new ServiceHost(typeof(IService));
host.AddEndpoint(typeof(IService),Binding, Uri);
host.Open();

The ServiceHost constructor is provided with the service type and an array of base addresses. Each base address must have a different transport specified in its URI. The actual address of each endpoint is derived relative to the base address. If there is more than one base address associated with the ServiceHost instance, the appropriate one is used based on the transport protocol. The base addresses are typically stored and retrieved from the application’s configuration file.

An application domain is a construct of a CLR that is the unit of isolation of an application. The main purpose of the hosting environment is to provide a worker process in an application domain for the ServiceHost to run.

The hosting environment is a process and runs as an identity. Therefore, it also provides a default security context to the service being hosted. Some hosting environments are more sophisticated than others and can provide features such as process recycling or application restart on failure.

Design considerations to be mindful of when choosing a hosting environment include:

  • availability

  • reliability

  • manageability

  • deployment

All hosting environments in the following list support the application of service-orientation, so choosing the correct environment comes down to addressing the type of transport and security parameters used to expose a service, scalability requirements, and SLA requirements.

  • self-hosting

  • Managed Windows Service

  • IIS 5.1 and IIS 6.0

  • Windows Activation Service (WAS)

Note that any service must be hosted within a runtime environment that creates and controls its context and lifetime.

Other -----------------
- SOA with .NET and Windows Azure : Service Implementation with WCF (part 2)
- SOA with .NET and Windows Azure : Service Implementation with WCF (part 1)
- Windows 7 : Thwarting Spam with Windows Live Mail’s Junk Filter (part 2) - Blocking Countries and Languages
- Windows 7 : Thwarting Spam with Windows Live Mail’s Junk Filter (part 1)
- Windows 7 : Configuring Windows Defender to Scan Email
- Windows 7 : Protecting Yourself Against Email Viruses
- Windows 7 : Understand Internet Explorer’s Advanced Security Options
- SOA with .NET and Windows Azure : WCF Services - Overview
- SOA with .NET and Windows Azure : Web Services (ASMX and WSE)
- Windows 7 : Enhancing Your Browsing Security (part 6) - Managing Add-Ons
- Windows 7 : Enhancing Your Browsing Security (part 5) - Encoding Addresses to Prevent IDN Spoofing
- Windows 7 : Enhancing Your Browsing Security (part 4) - Thwarting Phishers with the SmartScreen Filter
- Windows 7 : Enhancing Your Browsing Security (part 3) - Changing a Zone’s Security Level
- Windows 7 : Enhancing Your Browsing Security (part 2) - Adding and Removing Zone Sites
- Windows 7 : Enhancing Your Browsing Security (part 1) - Blocking Pop-Up Windows
- Windows 7 : Configuring Internet Explorer Security - Enhancing Your Browsing Privacy (part 4) - InPrivate Browsing and Filtering
- Windows 7 : Configuring Internet Explorer Security - Enhancing Your Browsing Privacy (part 3) - Enhancing Online Privacy by Managing Cookies
- Windows 7 : Configuring Internet Explorer Security - Enhancing Your Browsing Privacy (part 2) - Clearing the Address Bar List
- Windows 7 : Configuring Internet Explorer Security - Enhancing Your Browsing Privacy (part 1)
- Windows 7 : Managing Windows Firewall (part 2)
 
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
- First look: Apple Watch

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
programming4us programming4us